Skip to content

SPARK-2341 [MLLIB] loadLibSVMFile doesn't handle regression datasets - #1663

Closed
srowen wants to merge 3 commits into
apache:masterfrom
srowen:SPARK-2341
Closed

srowen wants to merge 3 commits into
apache:masterfrom
srowen:SPARK-2341

Conversation

@srowen

@srowen srowen commented Jul 30, 2014

Copy link
Copy Markdown
Member

Per discussion at https://issues.apache.org/jira/browse/SPARK-2341 , this is a look at deprecating the multiclass parameter. Thoughts welcome of course.

@SparkQA

SparkQA commented Jul 30, 2014

Copy link
Copy Markdown

QA tests have started for PR 1663. This patch merges cleanly.
View progress: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/17461/consoleFull

@SparkQA

SparkQA commented Jul 30, 2014

Copy link
Copy Markdown

QA results for PR 1663:
- This patch FAILED unit tests.
- This patch merges cleanly
- This patch adds no public classes

For more information see test ouptut:
https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/17461/consoleFull

@SparkQA

SparkQA commented Jul 30, 2014

Copy link
Copy Markdown

QA tests have started for PR 1663. This patch merges cleanly.
View progress: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/17464/consoleFull

@mengxr

mengxr commented Jul 30, 2014

Copy link
Copy Markdown
Contributor

LGTM. Waiting for Jenkins.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor: We can add the deprecated version to @deprecated, if you need to update the PR for some other reasons.

@SparkQA

SparkQA commented Jul 30, 2014

Copy link
Copy Markdown

QA results for PR 1663:
- This patch FAILED unit tests.
- This patch merges cleanly
- This patch adds no public classes

For more information see test ouptut:
https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/17464/consoleFull

@srowen

srowen commented Jul 30, 2014

Copy link
Copy Markdown
Member Author

The failures are because MIMA notes the removal of those label parsing classes, but they're private already. Should I exclude them? I can add the other things you mention.

@mengxr

mengxr commented Jul 30, 2014

Copy link
Copy Markdown
Contributor

Yes, MiMa doesn't recognize package private classes. Please add those exclusion rules manually:

[error]  * object org.apache.spark.mllib.util.MulticlassLabelParser does not have a correspondent in new version
[error]    filter with: ProblemFilters.exclude[MissingClassProblem]("org.apache.spark.mllib.util.MulticlassLabelParser$")
[error]  * class org.apache.spark.mllib.util.BinaryLabelParser does not have a correspondent in new version
[error]    filter with: ProblemFilters.exclude[MissingClassProblem]("org.apache.spark.mllib.util.BinaryLabelParser")
[error]  * class org.apache.spark.mllib.util.MulticlassLabelParser does not have a correspondent in new version
[error]    filter with: ProblemFilters.exclude[MissingClassProblem]("org.apache.spark.mllib.util.MulticlassLabelParser")
[error]  * object org.apache.spark.mllib.util.LabelParser does not have a correspondent in new version
[error]    filter with: ProblemFilters.exclude[MissingClassProblem]("org.apache.spark.mllib.util.LabelParser$")
[error]  * object org.apache.spark.mllib.util.BinaryLabelParser does not have a correspondent in new version
[error]    filter with: ProblemFilters.exclude[MissingClassProblem]("org.apache.spark.mllib.util.BinaryLabelParser$")
[error]  * interface org.apache.spark.mllib.util.LabelParser does not have a correspondent in new version
[error]    filter with: ProblemFilters.exclude[MissingClassProblem]("org.apache.spark.mllib.util.LabelParser")

@SparkQA

SparkQA commented Jul 30, 2014

Copy link
Copy Markdown

QA tests have started for PR 1663. This patch merges cleanly.
View progress: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/17511/consoleFull

@SparkQA

SparkQA commented Jul 31, 2014

Copy link
Copy Markdown

QA results for PR 1663:
- This patch PASSES unit tests.
- This patch merges cleanly
- This patch adds no public classes

For more information see test ouptut:
https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/17511/consoleFull

@mengxr

mengxr commented Jul 31, 2014

Copy link
Copy Markdown
Contributor

LGTM. Merged into master. Thanks!!

@asfgit asfgit closed this in e9b275b Jul 31, 2014
@srowen
srowen deleted the SPARK-2341 branch July 31, 2014 08:52
xiliu82 pushed a commit to xiliu82/spark that referenced this pull request Sep 4, 2014
Per discussion at https://issues.apache.org/jira/browse/SPARK-2341 , this is a look at deprecating the multiclass parameter. Thoughts welcome of course.

Author: Sean Owen <srowen@gmail.com>

Closes apache#1663 from srowen/SPARK-2341 and squashes the following commits:

8a3abd7 [Sean Owen] Suppress MIMA error for removed package private classes
18a8c8e [Sean Owen] Updates from review
83d0092 [Sean Owen] Deprecated methods with multiclass, and instead always parse target as a double (ie. multiclass = true)
MaxGekk added a commit to MaxGekk/spark that referenced this pull request Nov 24, 2026
…wo lanes (apache#1663)

<!-- title: [VARKA-612] Decline the day-time interval checks measured slower at two lanes -->
### What changes were proposed in this pull request?

At 128 bits an x86 host has two 64-bit lanes, and C2 lowers no 64-bit mask there, so a long-lane check's compare runs as the Vector API's Java loop. The day-time interval baseline read 0.5x to 1.0x at 128 bits, against 3.9x to 4.4x at 256. Master already declines a checked `BIGINT` operation there.

- On that host the compiler now also declines the checked day-time interval arithmetic measured slower: `dt + dt2`, `dt - dt2`, `abs(dt)` and `dt * k`, with `TWO_LANE_CHECK_REASON` in EXPLAIN (`VarkaIntervalCompiler.twoLaneMeasured`).
- Only the form's own check counts. A form whose check the range lattice removed, or whose only check sits in an operand, keeps fusing.
- The day-time baseline lists its three checked sections as `NONE` under the refusal, and its suite checks both settings.
- `VarkaTwoLaneDefault128Suite` enables `TIME` and checks the day-time arms decline while `TIME` and `TIMESTAMP_NTZ` checks fuse beside them.
- A two-lane census of the coverage table's value rows, `results/VARKA-612-refused.txt` (13 of 476), which `VarkaCoverageSuite` holds to what it renders.

<details>
<summary>What still fuses unmeasured, and design details</summary>

These long-lane checks keep fusing at two lanes, never measured there: `-dt`, `TIME`'s and `TIMESTAMP_NTZ`'s (`t + dts`, `ntz + dt`, `ntz - ntz2`, `timestampadd`), the ANSI and try narrowing casts of a `BIGINT` (`CAST(l AS INT)`), `d - d2`, `CAST(d AS TIMESTAMP_NTZ)` and `CAST(dt AS BIGINT)`. Their 128-bit measurement is owed as a follow-up (`VARKA-612.md` 9.4): no section times ANSI `CAST(l AS INT)`, `try_cast(l AS INT)`, `timestampadd(MONTH, <bigint>, ntz)`, `CAST(d AS TIMESTAMP_NTZ)` or `d - d2` yet, so new sections come first, then two runs at `-XX:MaxVectorSize=16` on an EPYC 7763, compared by minimums. A family slower there joins `twoLaneMeasured` in its own change.

The kernel plan refuses no check; `VarkaKernelPlan.holdsLongLaneCheck` is the walk the tests ask.

`VARKA-612-refused.txt` is rewritten by every coverage regeneration. `dev/varka_generated_merge.py` does not know the file, so a later branch that adds coverage rows (337a3, 609) must regenerate it, as `pre-pr.sh`'s full regeneration does.

</details>

### Why are the changes needed?

The checked day-time arms ran slower than the row path at 128 bits, so fusing them there costs time. The refusal sends them to the row path, as master does for a checked `BIGINT` operation.

### Does this PR introduce _any_ user-facing change?

No new setting. On x86 at 128 bits, the checked day-time interval arithmetic runs on the row path, with the reason in EXPLAIN. Answers are unchanged.

### How was this patch tested?

On the laptop, after the narrowing and its review fixes: `catalyst/testOnly *VarkaTwoLaneConditionSuite *VarkaCoverageSuite` passed (26, 1 cancelled), with the census file regenerated unchanged, and `*VarkaExpressionCompilerSuite -- -z "two-lane"` passed (3). Before the last fix: `sql/testOnly *VarkaTwoLaneDefault128Suite` (5) and the day-time, integral-cast and three `TIMESTAMP_NTZ` baseline queries suites passed (12).

The full local gate (`~/varka-ops/pre-pr.sh`) passed on `abf59d39901`. It merged master at `8e631d8ed41`, and its regeneration commit moved `width_audit.json`, `docs/sql-varka.md`, `casts_suites.tsv` and one line of `VARKA-612-refused.txt`. Extra-gate (lints, Error Prone, invariant and proof suites) passed, and so did the push check, at 450 counted lines. It passed again on `200cda31dfb`, the merge of master at `c4b0475d86e`, which brings apache#1669's regenerated `casts_suites.tsv` and apache#1626: that merge hand-resolved `DeclineSink`, `VarkaNodeCompiler` (master's `guardsProduct` kept, its copy of `TWO_LANE_CHECK_REASON` dropped for this branch's `VarkaKernelPlan` one) and `VarkaEmitterLongLaneSuite`'s new two-lane assertion, and a `/code-review high` of the resolution found no bug in it; the regeneration moved nothing, and the arm sweep over the changed catalyst and sql suites passed at the defaults, `useAVX=2` and `useAVX=3`.

The arm sweep ran every configuration (59 and the defaults) without a failure. `VarkaCoverageSuite` and `VarkaExpressionCompilerSuite`: 11,174 passed, 340 cancelled. `VarkaDayTimeIntervalBaselineQueriesSuite` and `VarkaTwoLaneDefault128Suite`: 361 passed, 59 cancelled.

CI is held at the owner's request. This PR is opened so its owed benchmarks can run on the runners. The CI Build and the option matrix run later.

<details>
<summary>What is owed</summary>

The 128-bit measurement of the unmeasured families, and a 128-bit rerun of `VarkaDayTimeIntervalBaselineBenchmark`, whose committed file still says the three checked sections fuse (`VARKA-612.md` 9.4, the owner's dispatch). A CI Build and the option matrix.

</details>

### Review

The first `/code-review high` found that the 128-bit suite's test would be left to Spark by row 613's rule, and that the census file was not committed; both are fixed. On the owner's decision the refusal was then narrowed from a tree walk over every long-lane check to the measured family. The re-review of that found two important issues: the stale width audit, which the regeneration answers, and an operand's check declining a measured form, now fixed. The review covers `120f563f38e`. After it come only the gate's master merge and its regeneration commit.

<details>
<summary>The nits left</summary>

- `VARKA-612-refused.txt` is unknown to the generated-file merge driver (above).
- `notACheck` tests only int-driven plans.

</details>

### Was this patch authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Claude Opus 5.5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants